package com.tmc.dao.impl.intcar;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Repository;
import com.tmc.bean.common.ContextInfo;
import com.tmc.dao.impl.BaseDaoImpl;
import com.tmc.entity.intcar.IntcarDriver;


/**
 * @author zhang
 * @date 2017年12月21日 下午4:28:21 
 */
@Repository
public class IntcarDriverDaoImpl extends BaseDaoImpl<IntcarDriver>{

	/**
	 * @author zhang
	 * @param context
	 * @param orderID
	 * @return
	 */
	public IntcarDriver getByOrderID(ContextInfo context, Long orderID) {
		String sql = "from IntcarDriver c where c.enabledFlag = 'Y' and c.orderID = :orderID";
		Map<String, Object> params = new HashMap<>();
		params.put("orderID", orderID);
		return this.get(sql, params);
	}

}
